/*
* Copyright 2016 Yonyou Auto Information Technology（Shanghai） Co., Ltd. All Rights Reserved.
*
* This software is published under the terms of the YONYOU Software
* License version 1.0, a copy of which has been included with this
* distribution in the LICENSE.txt file.
*
* @Project Name : marketing-wechat-open-api
*
* @File name : WechatInterfaceApiServiceInterface.java
*
* @Author : LiuJun
*
* @Date : 2016年12月8日
*
----------------------------------------------------------------------------------
*     Date       Who       Version     Comments
* 1. 2016年12月8日    LiuJun    1.0
*
*
*
*
----------------------------------------------------------------------------------
*/

package com.yonyou.gmcc.gateway.wechat.service.interfaces;

import java.util.Map;

import org.marketing.common.dto.customerInfo.PotentialUserDto;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * @author LiuJun 微信接口api接口
 * @date 2016年12月8日
 */
@FeignClient(name = "service-wechat")
public interface WechatInterfaceApiServiceInterface {

	/**
	 *
	 * @author LiuJun 网页授权获取用户基本信息
	 * @date 2016年12月8日
	 * @param code
	 * @param appid
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/wechat/interfaces/api/v1/userInfo", method = RequestMethod.GET, produces = "application/json;UTF-8")
	public PotentialUserDto getUserInfoThroughWebPageAuth(@RequestParam("code") String code,
			@RequestParam("appid") String appid);

	/**
	 *
	 * @author LiuJun 发布菜单
	 * @date 2016年12月8日
	 * @param appId
	 * @param accessToken
	 * @return
	 * @throws Exception
	 */
	@RequestMapping(value = "/wechat/interfaces/api/v1/menus", method = RequestMethod.POST, produces = "application/json;UTF-8")
	public @ResponseBody Map<String, Object> publishMenu(@RequestParam("appId") String appId,
			@RequestParam("accessToken") String accessToken);

	/**
	 *
	 * @author LiuJun 设置公众号模板类别、保存公众号模板列表
	 * @date 2017年1月12日
	 * @param authorizerAppid
	 * @param authorizerAccessToken
	 * @throws Exception
	 */
	@RequestMapping(value = "/wechat/interfaces/api/v1/templates", method = RequestMethod.POST)
	public void saveWeChatPublicNumberTemplate(@RequestParam("authorizerAppid") String authorizerAppid,
			@RequestParam("authorizerAccessToken") String authorizerAccessToken);

}
